package org.tourism.VO;

import lombok.Data;
import org.modelmapper.ModelMapper;
import org.tourism.entity.Complaint;
import org.tourism.entity.ComplaintHandling;

import java.sql.Time;
import java.time.LocalDateTime;

@Data
public class ComplaintHandlingVO {
    private int id;
    private int complaintId;
    private String content;
    private int evaluation;
    private LocalDateTime time;
    private String attachment;

    public ComplaintHandling toEntity(){
        ComplaintHandling complaintHandling = new ComplaintHandling();
        ModelMapper modelMapper = new ModelMapper();
        modelMapper.map(this, complaintHandling);
        return complaintHandling;
    }

    public static ComplaintHandlingVO toVO(ComplaintHandling complaintHandling){
        ComplaintHandlingVO complaintHandlingVO = new ComplaintHandlingVO();
        ModelMapper modelMapper = new ModelMapper();
        modelMapper.map(complaintHandling, complaintHandlingVO);
        return complaintHandlingVO;
    }
}
